package club.dataresources.entity;

import java.util.ArrayList;
import java.util.List;

public class ProductExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ProductExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andProductIdIsNull() {
            addCriterion("product_id is null");
            return (Criteria) this;
        }

        public Criteria andProductIdIsNotNull() {
            addCriterion("product_id is not null");
            return (Criteria) this;
        }

        public Criteria andProductIdEqualTo(Integer value) {
            addCriterion("product_id =", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotEqualTo(Integer value) {
            addCriterion("product_id <>", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThan(Integer value) {
            addCriterion("product_id >", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("product_id >=", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdLessThan(Integer value) {
            addCriterion("product_id <", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdLessThanOrEqualTo(Integer value) {
            addCriterion("product_id <=", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdIn(List<Integer> values) {
            addCriterion("product_id in", values, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotIn(List<Integer> values) {
            addCriterion("product_id not in", values, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdBetween(Integer value1, Integer value2) {
            addCriterion("product_id between", value1, value2, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotBetween(Integer value1, Integer value2) {
            addCriterion("product_id not between", value1, value2, "productId");
            return (Criteria) this;
        }

        public Criteria andProductLevelIsNull() {
            addCriterion("product_level is null");
            return (Criteria) this;
        }

        public Criteria andProductLevelIsNotNull() {
            addCriterion("product_level is not null");
            return (Criteria) this;
        }

        public Criteria andProductLevelEqualTo(String value) {
            addCriterion("product_level =", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelNotEqualTo(String value) {
            addCriterion("product_level <>", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelGreaterThan(String value) {
            addCriterion("product_level >", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelGreaterThanOrEqualTo(String value) {
            addCriterion("product_level >=", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelLessThan(String value) {
            addCriterion("product_level <", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelLessThanOrEqualTo(String value) {
            addCriterion("product_level <=", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelLike(String value) {
            addCriterion("product_level like", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelNotLike(String value) {
            addCriterion("product_level not like", value, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelIn(List<String> values) {
            addCriterion("product_level in", values, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelNotIn(List<String> values) {
            addCriterion("product_level not in", values, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelBetween(String value1, String value2) {
            addCriterion("product_level between", value1, value2, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductLevelNotBetween(String value1, String value2) {
            addCriterion("product_level not between", value1, value2, "productLevel");
            return (Criteria) this;
        }

        public Criteria andProductCostIsNull() {
            addCriterion("product_cost is null");
            return (Criteria) this;
        }

        public Criteria andProductCostIsNotNull() {
            addCriterion("product_cost is not null");
            return (Criteria) this;
        }

        public Criteria andProductCostEqualTo(Float value) {
            addCriterion("product_cost =", value, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostNotEqualTo(Float value) {
            addCriterion("product_cost <>", value, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostGreaterThan(Float value) {
            addCriterion("product_cost >", value, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostGreaterThanOrEqualTo(Float value) {
            addCriterion("product_cost >=", value, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostLessThan(Float value) {
            addCriterion("product_cost <", value, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostLessThanOrEqualTo(Float value) {
            addCriterion("product_cost <=", value, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostIn(List<Float> values) {
            addCriterion("product_cost in", values, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostNotIn(List<Float> values) {
            addCriterion("product_cost not in", values, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostBetween(Float value1, Float value2) {
            addCriterion("product_cost between", value1, value2, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductCostNotBetween(Float value1, Float value2) {
            addCriterion("product_cost not between", value1, value2, "productCost");
            return (Criteria) this;
        }

        public Criteria andProductBrandIsNull() {
            addCriterion("product_brand is null");
            return (Criteria) this;
        }

        public Criteria andProductBrandIsNotNull() {
            addCriterion("product_brand is not null");
            return (Criteria) this;
        }

        public Criteria andProductBrandEqualTo(String value) {
            addCriterion("product_brand =", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandNotEqualTo(String value) {
            addCriterion("product_brand <>", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandGreaterThan(String value) {
            addCriterion("product_brand >", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandGreaterThanOrEqualTo(String value) {
            addCriterion("product_brand >=", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandLessThan(String value) {
            addCriterion("product_brand <", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandLessThanOrEqualTo(String value) {
            addCriterion("product_brand <=", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandLike(String value) {
            addCriterion("product_brand like", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandNotLike(String value) {
            addCriterion("product_brand not like", value, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandIn(List<String> values) {
            addCriterion("product_brand in", values, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandNotIn(List<String> values) {
            addCriterion("product_brand not in", values, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandBetween(String value1, String value2) {
            addCriterion("product_brand between", value1, value2, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductBrandNotBetween(String value1, String value2) {
            addCriterion("product_brand not between", value1, value2, "productBrand");
            return (Criteria) this;
        }

        public Criteria andProductExplainIsNull() {
            addCriterion("product_explain is null");
            return (Criteria) this;
        }

        public Criteria andProductExplainIsNotNull() {
            addCriterion("product_explain is not null");
            return (Criteria) this;
        }

        public Criteria andProductExplainEqualTo(String value) {
            addCriterion("product_explain =", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainNotEqualTo(String value) {
            addCriterion("product_explain <>", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainGreaterThan(String value) {
            addCriterion("product_explain >", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainGreaterThanOrEqualTo(String value) {
            addCriterion("product_explain >=", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainLessThan(String value) {
            addCriterion("product_explain <", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainLessThanOrEqualTo(String value) {
            addCriterion("product_explain <=", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainLike(String value) {
            addCriterion("product_explain like", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainNotLike(String value) {
            addCriterion("product_explain not like", value, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainIn(List<String> values) {
            addCriterion("product_explain in", values, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainNotIn(List<String> values) {
            addCriterion("product_explain not in", values, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainBetween(String value1, String value2) {
            addCriterion("product_explain between", value1, value2, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductExplainNotBetween(String value1, String value2) {
            addCriterion("product_explain not between", value1, value2, "productExplain");
            return (Criteria) this;
        }

        public Criteria andProductNameIsNull() {
            addCriterion("product_name is null");
            return (Criteria) this;
        }

        public Criteria andProductNameIsNotNull() {
            addCriterion("product_name is not null");
            return (Criteria) this;
        }

        public Criteria andProductNameEqualTo(String value) {
            addCriterion("product_name =", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameNotEqualTo(String value) {
            addCriterion("product_name <>", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameGreaterThan(String value) {
            addCriterion("product_name >", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameGreaterThanOrEqualTo(String value) {
            addCriterion("product_name >=", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameLessThan(String value) {
            addCriterion("product_name <", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameLessThanOrEqualTo(String value) {
            addCriterion("product_name <=", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameLike(String value) {
            addCriterion("product_name like", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameNotLike(String value) {
            addCriterion("product_name not like", value, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameIn(List<String> values) {
            addCriterion("product_name in", values, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameNotIn(List<String> values) {
            addCriterion("product_name not in", values, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameBetween(String value1, String value2) {
            addCriterion("product_name between", value1, value2, "productName");
            return (Criteria) this;
        }

        public Criteria andProductNameNotBetween(String value1, String value2) {
            addCriterion("product_name not between", value1, value2, "productName");
            return (Criteria) this;
        }

        public Criteria andProductImgIsNull() {
            addCriterion("product_img is null");
            return (Criteria) this;
        }

        public Criteria andProductImgIsNotNull() {
            addCriterion("product_img is not null");
            return (Criteria) this;
        }

        public Criteria andProductImgEqualTo(String value) {
            addCriterion("product_img =", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgNotEqualTo(String value) {
            addCriterion("product_img <>", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgGreaterThan(String value) {
            addCriterion("product_img >", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgGreaterThanOrEqualTo(String value) {
            addCriterion("product_img >=", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgLessThan(String value) {
            addCriterion("product_img <", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgLessThanOrEqualTo(String value) {
            addCriterion("product_img <=", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgLike(String value) {
            addCriterion("product_img like", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgNotLike(String value) {
            addCriterion("product_img not like", value, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgIn(List<String> values) {
            addCriterion("product_img in", values, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgNotIn(List<String> values) {
            addCriterion("product_img not in", values, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgBetween(String value1, String value2) {
            addCriterion("product_img between", value1, value2, "productImg");
            return (Criteria) this;
        }

        public Criteria andProductImgNotBetween(String value1, String value2) {
            addCriterion("product_img not between", value1, value2, "productImg");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}